<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: 2022/1/5 0005
 * Time: 16:24
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

declare(strict_types=1);


namespace app\common\business;

use app\common\model\MallGoodsApply as ModelObj;
use think\Exception;

class GoodsApply extends Base
{
    /**
     * @var \app\common\model\MallManager
     */
    protected ModelObj $modelObj;

    /**
     *
     */
    public function __construct()
    {
        $this->modelObj = new ModelObj();
    }

    /**
     * 商品审核记录
     * @param array $where
     * @param string $field
     * @param string $order
     * @return array
     * @throws Exception
     */
    public function getApplyGoods(array $where,string $field='*',string $order='id desc'){
        try{
           $list= $this->modelObj->getModelByListToArray($where,$field,$order);
        }catch (\Exception $e){
            throw new Exception("查询失败");
        }
        return $list;
    }
}